package com.bwie.controller;

import com.bwie.pojo.TCq;
import com.bwie.pojo.TJb;
import com.bwie.service.TCqService;
import com.bwie.service.TJbService;
import com.bwie.service.TUserService;
import com.bwie.service.TZcService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import com.bwie.vo.PageInfoVo;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/index")
public class UserController {

    @Autowired
    TUserService tUserService;

    @Autowired
    TCqService tCqService;

    @Autowired
    TZcService tZcService;

    @Autowired
    TJbService tJbService;

    /**
     * 登录
     * @param loginInfoVo
     * @return
     */
    @PostMapping("/getlogin")
    public R getlogin(@RequestBody LoginInfoVo loginInfoVo){
        return tUserService.getlogin(loginInfoVo);
    }

    /**
     *
     * @param pageInfoVo
     * @return
     */
    @PostMapping("/getcqlist")
    public R getcqlist(@RequestBody PageInfoVo pageInfoVo){
        return tCqService.getcqlist(pageInfoVo);
    }


    /**
     * 我的资产
     */
    @PostMapping("/getMyZc")
    public R getMyZc(@RequestBody PageInfoVo pageInfoVo){
        return tZcService.getMyZc(pageInfoVo);
    }

    @PostMapping("/addcq")
    public R addcq(@RequestBody TCq tCq){
        return tCqService.addcq(tCq);
    }

    @PostMapping("/getjblist1")
    public R getjblist1(@RequestBody PageInfoVo pageInfoVo){
        return tJbService.getjblist1(pageInfoVo);
    }

}
